RECUPERACIÓN PRIMER PERIODO
Sheets("division").Cells(6,
2) = TEXTBOX1.Value
End Sub
Private Sub
CommandButton2_Click()
TEXTBOX1.Text
= ""
Unload Me
If Trim(TxtUser.Text) = "" Then
MsgBox "Ingrese Usuario", vbExclamation, "Alerta"
TxtUser.SetFocus
Exit Sub
End If
If Trim(TxtPass.Text) = "" Then
MsgBox "Ingrese Contraseña", vbExclamation, "Alerta"
TxtPass.SetFocus
Exit Sub
End If
If Trim(TxtUser.Text) = "COORD" And Trim(TxtPass.Text) = "1234" Then
MsgBox "Ingreso Permitido", vbInformation, "OK"
Application.Visible = True
End
Else
MsgBox "Los datos ingresados no son correctos, inténtelo de nuevo", vbExclamation, "Alerta"
End If
En ThisWorkbook
Hacemos doble clic y digitamos el siguiente código
Application.Visible = False
UserForm3.Show
CODIGO GUARDAR Y SALIR
ThisWorkbook.Close Savechanges = False
IR A BASES DE DATOS
Sheets("BASE DE DATOS").Select
BOTON CANCELAR
Unload Me
CODIGO GRABAR
ActiveWorkbook.save
BOTON CANCELAR
Unload Me
CODIGO GRABAR
ActiveWorkbook.save
CODIGO REGISTRAR PRODUCTOS
For I = 1 To 100
If Cells(I + 1, 2).Value = "" Then
Cells(I + 1, 2).Value = TextBox1.Text
Cells(I + 1, 3).Value = TextBox2.Text
Cells(I + 1, 4).Value = TextBox3.Text
Exit For
End If
Next
CODIGO LIMPIAR
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
BOTÓN INGRESAR
UserForm3.Show